package com.crm.common.config.knife4;

import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Info;
import org.springdoc.core.models.GroupedOpenApi;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class Knife4jConfiguration {
    @Bean
    public OpenAPI OaOpenAPI() {
        return new OpenAPI().info(
                new Info()
                        .description("CRM系统API")
                        .title("CRM系统API")
                        .version("1.0")
        );
    }

    @Bean
    public GroupedOpenApi SysUserAPI(){
        return GroupedOpenApi.builder()
                .group("用户管理")
                .pathsToMatch("/v1/api/user/**")
                .build();
    }
}